package com.hgw.Demo03_DecoratorPattern.examples;

/**
 * Data time:2021/12/14 18:52
 * StudentID:2019112118
 * Author:hgw
 * Description: 测试类
 */
public class Client {
    public static void main(String[] args) {
        Component component,componentSB,componentBB;            // 使用抽象构建定义对象
        component = new Window();                                // 创建具体构建对象
        componentSB = new ScrollBarDecorator(component);         // 创建装饰后的构建对象
        componentBB = new BlackBorderDecorator(componentSB);      // 将装饰了一次的对象注入另一个装饰类中，进行第二次装饰
        componentBB.display();
    }
}
